﻿using Microsoft.TeamFoundation.WorkItemTracking.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CMS6Tools.Common.TFS
{
    public interface IWebAccessProxy
    {
        Team GetTeamCapacitySettings(Project project, string teamName, bool isDefaultTeam, string iterationPath, string iterationID);
    }

    public static class WebAccessProxyProvider
    {
        public static IWebAccessProxy GetProxy(string tfsVersion = "2015")
        {
            //return new WebAccessProxy(tfsVersion);

            switch (tfsVersion)
            {
                case "2013":
                    return new WebAccessProxy(tfsVersion);
                case "2015":
                default:
                    return new Tfs2015WebAccessProxy();
            }
        }
    }
}
